package com.eCommerce.server.corebackend.util;

import java.util.Date;
import java.util.Locale;

import com.ibm.icu.text.SimpleDateFormat;



public class UtilDate {
	public static long ConvertDateToLong(String pattern,Date date)
    {
		String locale = "fr_FR";
		String language = locale.substring(0,locale.indexOf('_'));
		String country = locale.substring(locale.indexOf('_') + 1);
		SimpleDateFormat sdf = new SimpleDateFormat(pattern, new Locale(language, country));
		return Long.parseLong(sdf.format(date).toUpperCase());		
		
    }
	
	public static long ConvertDateToLong(Date date)
	{
		return ConvertDateToLong("yyyyMMddHHmmss", date);
	}
}
